<?php

/**
 * Editionoptions filter form base class.
 *
 * @package    briefingPropel
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseEditionoptionsFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'is_technical_terms'   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_foraign_word'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_superlative'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_old_language'      => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'is_start_of_sentence' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'ownChoiceId'          => new sfWidgetFormPropelChoice(array('model' => 'Ownchoice', 'add_empty' => true)),
      'moreText'             => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'is_technical_terms'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'is_foraign_word'      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'is_superlative'       => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'is_old_language'      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'is_start_of_sentence' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'ownChoiceId'          => new sfValidatorPropelChoice(array('required' => false, 'model' => 'Ownchoice', 'column' => 'idOwnChoice')),
      'moreText'             => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('editionoptions_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Editionoptions';
  }

  public function getFields()
  {
    return array(
      'idEditionOptions'     => 'Number',
      'is_technical_terms'   => 'Number',
      'is_foraign_word'      => 'Number',
      'is_superlative'       => 'Number',
      'is_old_language'      => 'Number',
      'is_start_of_sentence' => 'Number',
      'ownChoiceId'          => 'ForeignKey',
      'moreText'             => 'Text',
    );
  }
}
